package com.my;

/**
 * Created by yijy on 2018/3/7.
 */
public class TestHashMap {

    public static void main(String[] args) throws ClassNotFoundException {
        Integer i=2;
        Integer j = 4;
        System.out.println("before i="+i+",j="+j);
        swap(i,j);
        System.out.println("after i="+i+",j="+j);
    }

    /**
     * Integer是final类，所以地址的指向是不变的
     * @param i
     * @param j
     */
    public static void swap(Integer i,Integer j) {
        int tmp = i;
        i = j;
        j = tmp;
    }


}
